package com.usian.admin.controller;

import com.usian.admin.service.LoginService;
import com.usian.apis.admin.LoginControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/login")
@RestController
public class LoginController implements LoginControllerApi {
    @Autowired
    private LoginService loginService;

    @Override
    @RequestMapping("/in")
    public ResponseResult login(@RequestBody AdUserDto adUserDto) {
        return loginService.login(adUserDto);
    }
}
